home *** CD-ROM | disk | FTP | other *** search
- ' A formItem is used to keep track of information about
- ' a specific form instance.
-
- Type FormItem
- fiUsed As Integer ' TRUE if occupied
- fiFileName As String
- fiTable As String
- End Type
-
- Dim LastAlloc As Integer
-
- Function FormAlloc (fia() As FormItem) As Integer
-
- ' Allocate a form ... assumes that one is available.
-
- For i% = LBound(fia) To UBound(fia)
- If Not fia(i%).fiUsed Then
- fia(i%).fiUsed = True
- FormAlloc = i%
- LastAlloc = i%
- Exit Function
- End If
- Next
- End Function
-
- Function FormAvail (fia() As FormItem) As Integer
-
- ' Checks to see if any form slots are available in
- ' the form array.
-
- For i% = LBound(fia) To UBound(fia)
- If Not fia(i%).fiUsed Then
- FormAvail = True
- Exit Function
- End If
- Next
- FormAvail = False
- End Function
-
- Sub FormFree (fi As FormItem)
- fi.fiUsed = False
- End Sub
-
- Sub FormInit (fia() As FormItem)
- For i% = LBound(fia) To UBound(fia)
- fia(i%).fiUsed = False
- Next
- End Sub
-
- Function FormLastAlloc () As Integer
- FormLastAlloc = LastAlloc
- End Function
-
-